home *** CD-ROM | disk | FTP | other *** search
- Path: news.eunet.fi!fipnet!kone!jsaarinen
- Newsgroups: comp.sys.amiga.programmer
- X-NewsReader: IntuiNews 1.2b (31.7.94)
- References: <4g5mv0$sns@news01.uni-trier.de>
- From: "Jyrki Saarinen" <jsaarinen@kone.fipnet.fi>
- Date: Mon, 19 Feb 96 19:30:09 UT
- Comments: Illegal date header - new date added by quicknews
- X-Original-Date: Mon, 19 Feb 96 19:36:37
- MIME-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: binary
- Subject: Re: Wolfenstein Texture mapping problem
- Message-ID: <38232525@kone.fipnet.fi>
-
-
- > I'm currently writing a Wolfenstein-type engine. I did start in C and
- > slowly converted parts over to assembler. Although I have experienced
- > some speed up, I'm still not satisfied. I think the bottleneck is the
- > wall texturemapping.
-
- Very fast wallmapping is easy.
-
- > What I do is calculate the ratio texture_height/wall_height as a
- > fixpoint number and use it to add to the offset into the texture. The
- >áfixpoint arithmetics do involve some shifting and stuff, and I guess that
- > it simply too much overhead.
-
- Use addx! No shifting needed:
-
- move.b (a0,d0.w),(a1) ;fetch pixel from the texture and write
- addx.l d1,d0 ;interpolate, 16 bit fraction in the upper
- ;word
- add.l a2,a1 ;move to the next line
-
- You should use 90 degrees rotated textures to be able to use
- this. This loop is 14 68020/68030 cycles per pixel, quite fast.
- Some unrolling would be a very nice thing to do, too..
-
- Also, for a Wolf3D clone with only walls, scrambled chunky
- buffer would be good since rendering is done vertically,
- thus the first pass can be eliminated. Then, while copying
- the chunky buffer from fast to chip do one or two c2p passes
- for free and then use QBlit() to do async c2p passes.
-
- -- _
- a Stellar programmer _ //
- "Amiga - back for the future" \X/
-